home *** CD-ROM | disk | FTP | other *** search
/ Macworld Expo - Develope…Central & Net Innovations / Developer Central and Net Innovators (MacWorld Expo) (January 1999).iso / Developer Central / Bowers Development / Demo AppMaker / Examples / PowerPlant / AMReminder / DDocData.cp < prev    next >
Encoding:
Text File  |  1998-10-11  |  1.1 KB  |  83 lines  |  [TEXT/CWIE]

  1. // DDocData.cp -- data container class for AMReminder
  2.  
  3. #include "DDocData.h"
  4.  
  5. #include <LFileStream.h>
  6.  
  7.  
  8. //----------
  9. DDocData::DDocData ()
  10. {
  11.     mReminderChoice = -1;
  12. }
  13.  
  14. //----------
  15. DDocData::~DDocData ()
  16. {
  17. }
  18.  
  19. //----------
  20. void    DDocData::CopyFrom (
  21.     DDocData*        inOther)
  22. {
  23.     mReminderChoice = inOther->mReminderChoice;
  24.     // mReminders = inOther->mReminders;
  25. }
  26.  
  27. //----------
  28. void    DDocData::ReadFromFile (
  29.     LFileStream*    inFile)
  30. {
  31.     mReminders.ReadFromFile (inFile);
  32. }
  33.  
  34. //----------
  35. void    DDocData::WriteToFile (
  36.     LFileStream*    inFile)
  37. {
  38.     mReminders.WriteToFile (inFile);
  39. }
  40.  
  41.  
  42. //----------
  43. SInt16        DDocData::GetReminderChoice () const
  44. {
  45.  
  46.     return mReminderChoice;
  47. }
  48.  
  49. //----------
  50. void    DDocData::SetReminderChoice (
  51.     SInt16        inValue)
  52. {
  53.     mReminderChoice = inValue;
  54.         SignalDataChanged (idIsSelected);
  55.  
  56.     SignalDataChanged (idReminderChoice);
  57. }
  58.  
  59.  
  60. //----------
  61. TAMArray<DReminder>*        DDocData::GetReminders ()
  62. {
  63.  
  64.     return &mReminders;
  65. }
  66.  
  67.  
  68. //----------
  69. Boolean        DDocData::GetIsSelected () const
  70. {
  71.     return ((0 <= mReminderChoice)
  72.             && (mReminderChoice < mReminders.GetCount ()));
  73.  
  74. }
  75.  
  76. //----------
  77. void    DDocData::SetIsSelected (
  78.     Boolean        inValue)
  79. {
  80.  
  81.     SignalDataChanged (idIsSelected);
  82. }
  83.